using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsProject1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            listViewProcessess.View = View.Details;
            listViewProcessess.GridLines = true;
            listViewProcessess.FullRowSelect = true;

            Process[] prl1 = Process.GetProcesses();
            String[] arr = new String[5];
            foreach (Process theprocess in prl1)
            {
                arr[0] = theprocess.ProcessName;
                arr[1] = theprocess.MachineName;
                arr[3] = (theprocess.WorkingSet64 / (8 * 1024)).ToString() + "K";
                

                ListViewItem ilv = new ListViewItem(arr);
                listViewProcessess.Items.Add(ilv);
            }

            foreach (Process theprocess in prl1)
            {
                
            }
        }

        private void heplToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void tabPageApplications_Click(object sender, EventArgs e)
        {

        }

        private void tabPageProcesses_Click(object sender, EventArgs e)
        {

        }

        private void tabPageUser_Click(object sender, EventArgs e)
        {

        }

        private void tabPageServices_Click(object sender, EventArgs e)
        {
			// vIET gi do
        }

        private void listViewApplications_SelectedIndexChanged(object sender, EventArgs e)
        {
            
        }

        private void statusStrip2_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void process1_Exited(object sender, EventArgs e)
        {

        }

        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {

        }

        private void process1_Exited_1(object sender, EventArgs e)
        {

        }

        private void listViewProcessess_SelectedIndexChanged(object sender, EventArgs e)
        {
            
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void listViewUser_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void listViewServices_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
